package com.ittable.datasource.route.dao.single;

import com.ittable.datasource.route.dao.MybatisBaseDao;
import com.ittable.datasource.route.model.Domain;

import java.util.HashMap;
import java.util.Map;

/**
 * @author srh
 * @date 2020/12/20
 **/
public class DomainDAO extends MybatisBaseDao {

    public int insert(Domain domain) {
        return this.executeInsert("domain.insert", domain);
    }

    public Domain select(Long id) {
        Map<String, Object> condition = new HashMap<>();
        condition.put("id", id);
        return (Domain) this.executeQueryForObject("domain.selectById", condition);
    }

}
